<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>主题列表</title>
</head>
<body>
   <%@ include file="/common/header.jsp" %>
   <br><br><br>
   <table width="94%" border="1" align="center">
      <tr align="left">
         <td colspan="5">
           <table width="97%" border="0" align="center">
              <tr>
                 <td>欢迎你访问论坛:<%=session.getAttribute("username") %></td>
                 <td align="right">
                   <a href="backtoindex">首页&nbsp;</a>
                   <a href="logoff">登陆注销&nbsp;</a>
                   <a href="newtopic.jsp?forumid=${forumid }">发新话题&nbsp;</a>
                 </td>
              </tr>
           </table>
         </td>
      </tr>
      <tr align="center" bgcolor="#009999">
        <td colspan="5">${forumname }</td>
      </tr>
      <tr align="center">
        <td width="40%">话题</td>
        <td width="12%">作者</td>
        <td width="15%">发表时间</td>
        <td width="12%">回帖数</td>
        <td width="15%">最后回复时间</td>
      </tr>
     <c:forEach items="${topiclist }" var="topic">
       <tr align="center">
         <td>
           &nbsp;<a href="responselist?topicid=${topic.id }&pagenum=1">${topic.title}</a>
         </td>
         <td>
           &nbsp;${topic.author }
         </td>
          <td>
           &nbsp;${topic.submittime }
         </td>
         <td>
           &nbsp;${topic.responsenum }
         </td>
         <td>
           &nbsp;${topic.responsetime }
         </td>
       </tr>
       
     </c:forEach>
   </table>
   <br><br>
   <div align="center">
   <a href="topiclist?id=${forumid }&pagenum=1">第一页</a> &nbsp;&nbsp;
   <a href="topiclist?id=${forumid }&pagenum=${lastpage}">上一页</a> &nbsp;&nbsp;
   <a href="topiclist?id=${forumid }&pagenum=${nextpage}">下一页</a> &nbsp;&nbsp;
   </div>
   <br><br>
   <%@ include file="/common/header.jsp" %>
</body>
</html>